package com.wanxi.array;

import java.util.ArrayList;
import java.util.Arrays;

public class StudentDemo {
    public static void main(String[] args) {
        Student[] students = new Student[3];
        students[0] = new Student("张三", 22);
        students[1] = new Student();
        students[2] = new Student();
//        students[3] = new Student();
        System.out.println(Arrays.toString(students));
        ArrayList<Student> arrayList=new ArrayList<>();
        arrayList.add(new Student("张三",22));
        arrayList.add(new Student("张三",22));
        arrayList.add(new Student("张三",22));
        arrayList.add(new Student("张三",22));
        arrayList.add(new Student("张三",22));
        System.out.println(arrayList);
    }
}
